package org.gfix.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import org.gfix.types.FixVersion;

/**
 * This holds the tag number which marks the start of a repeating group. 
 * This would be expected to be against a field of a collection type or
 * array
 * @author alan
 *
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface FixGroup {

	/**
	 * The version of FIX that this binding is applicable for.
	 * 
	 * @return
	 */
	public FixVersion fixVersion();
	
	/**
	 * The tag number that contains the number of elements in the repeating group
	 * and comes before the first element of the repeating group.
	 * 
	 * @return
	 */
	public int fixGroupTag();
	
	/**
	 * Sets the order the field should appear in the fix message.
	 * The default of 1000 is normally fine, however some
	 * engines may require the tags in a set order. 
	 * This should never be set to negative as these values 
	 * are reserved for system use.
	 * @return
	 */
	public int order() default 1000;
}
